package win.larryzeal.spring.util;

/**
 * @author LarryZeal
 *
 */
public class MyResult {
	private Integer	code;
	private String	msg;
	private Object	data;

	public static MyResult failResult(Integer code, String msg) {
		MyResult result = new MyResult();
		result.code = code;
		result.msg = msg;
		result.data = null;
		return result;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "MyResult [code=" + code + ", msg=" + msg + ", data=" + data + "]";
	}

}
